<%--
  Created by IntelliJ IDEA.
  User: vergil
  Date: 17-3-28
  Time: 下午10:05
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<body>
<h2>Hello World!</h2>

<script>
    <%--console.log("test");--%>
    <%--var url = 'ws://'+ window.location.host +'<%=request.getContextPath() %>'+ '/socket';--%>
    <%--var sock = new WebSocket(url);--%>
    <%--sock.onopen = function () {--%>
        <%--console.log("socket start...");--%>
        <%--sock.send("hello world!");--%>
    <%--}--%>
    <%--sock.onmessage = function (msg) {--%>
        <%--console.log(msg.data);--%>
        <%--sock.send("hello world!");--%>
    <%--}--%>
     <%--sock.onclose = function(){--%>
     	<%--console.log("socket closs..");--%>
     <%--}--%>
</script>
</body>
</html>
